home *** CD-ROM | disk | FTP | other *** search
/ Ray Dream Studio 5 / Ray Dream.iso / pc / DreamSDK / Windows / SAMPLES / ATMOS / FOG / COMFOG.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-11  |  1.9 KB  |  65 lines

  1. // Copyright (c)1995 Ray Dream, Inc. All Rights Reserved.
  2. /*$Id: COMFog.h 1.1 1996/07/18 23:15:54 Damien Exp $*/
  3.  
  4. //
  5. // COM Example of an Atmospheric Shader
  6. //
  7.  
  8. #ifndef __COMFOG__
  9. #define __COMFOG__  
  10.  
  11. #ifndef __I3DEXAB__
  12. #include "I3DExAB.h"
  13. #endif
  14.                   
  15. // define the Atmos CLSID
  16.  
  17. // 61879E61-7EFA-101C-8BFC-F629D50D262B
  18. DEFINE_GUID(CLSID_Atmos, 0x61879E61L, 0x7EFA, 0x101C, 0x8B, 0xFC, 0xF6, 0x29, 0xD5, 0x0D, 0x26, 0x2B);
  19.  
  20.  
  21.  
  22. typedef struct AtmosData {
  23.   COLOR3D fColor;      // "Color" of the fog
  24.   NUM3D   fZmin;       // Minimum altitude of the fog
  25.   NUM3D   fZmax;       // Maximum altitude of the fog
  26.   NUM3D   fVisibility; // Distance of Visibility
  27.   } AtmosData;
  28.  
  29.  
  30. // Atmos Object :
  31. #undef INTERFACE
  32. #define INTERFACE Atmos
  33. class Atmos : public I3DExAtmosphericShader {
  34. public :  
  35.   Atmos();
  36.   ~Atmos();
  37.   
  38.   // IUnknown Interface :
  39.   STDMETHODIMP         QueryInterface(THIS_ REFIID riid, LPVOID* ppvObj);
  40.   STDMETHODIMP_(ULONG) AddRef(THIS);
  41.   STDMETHODIMP_(ULONG) Release(THIS);
  42.   
  43.   // I3DExtension method :
  44.   STDMETHODIMP_(I3DExtension*) Clone(THIS);
  45.   STDMETHODIMP                 ShellUtilitiesInit(THIS_ IShUtilities* shellUtilities);  
  46.   
  47.   // I3DExDataExchanger methods :
  48.   STDMETHODIMP_(ExtensionDataMap*) GetExtensionDataMap(THIS);
  49.   STDMETHODIMP_(void*)             GetExtensionDataBuffer(THIS);
  50.   STDMETHODIMP                     ExtensionDataChanged(THIS);
  51.   STDMETHODIMP                     HandleEvent(THIS_ ULONG sourceID);
  52.   STDMETHODIMP_(short)             GetResID(THIS);
  53.   
  54.   // I3DExAtmosphericShader methods
  55.   STDMETHODIMP SegmentFilter(THIS_ VECTOR3D* beg, VECTOR3D* end, COLOR3D* filterOut);
  56.   STDMETHODIMP DirectionFilter(THIS_ VECTOR3D* origin, VECTOR3D* direction, COLOR3D* filterOut);
  57.   
  58. private :
  59.   ULONG     fCRef;      // reference Counter
  60.   AtmosData fData;      // Atmospheric Data
  61.   };
  62.  
  63.  
  64. #endif
  65.